package one.stand.mapper;

import one.stand.model.GoodSpec;
import one.stand.model.Goods;
import one.stand.model.GoodsType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsApiMapper {
    List<Goods> selectIndex(@Param("companyId") Integer companyId);

    List<Goods> selectSearch(@Param("companyId") Integer companyId, @Param("keyword") String keyword, @Param("categoryId") Integer categoryId);

    List<GoodSpec> getSpecsByCompanyId(@Param("companyId") Integer companyId, @Param("goodsId") Integer goodsId);

    List<Goods> getGoodsByCompanyId(@Param("companyId") Integer companyId, @Param("categoryId") Integer categoryId);

    GoodSpec getSpec(@Param("goodsId") Integer goodsId);

    List<GoodsType> selectListByCompanyId(@Param("companyId") Integer companyId);

    List<GoodsType> selectTypesHasGoods(@Param("companyId") Integer companyId);
}
